﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Template.Infrastructure.ExpressionUtil
{
    public class FilterInfo
    {

        /// <summary>
        /// 字段名称
        /// </summary>
        public string Key { get; set; }
        /// <summary>
        /// 值
        /// </summary>
        public string Value { get; set; }
        /// <summary>
        /// 值类型
        /// </summary>
        public string ValueType { get; set; } = "string";
        /// <summary>
        /// 
        /// </summary>
        public FilterOperator Operator { get; set; } = FilterOperator.Equal;

        public FilterConnect Connect { get; set; } = FilterConnect.And;

        public bool IsEmptyOrNull { get; set; } = false;
    }

    public enum FilterOperator
    {

        Contains,
        Equal,
        GreaterThan,
        GreaterEqual,
        GreaterThanOrEqual,
        LessThan,
        LessEqual,
        LessThanOrEqual,
        NotEqual,
        In,
        Between
    }

    public enum FilterConnect
    {
        And,
        Or
    }
}
